package com.hyz.controller;

import com.hyz.dto.ActionDTO;
import com.hyz.dto.ActionResult;
import com.hyz.dto.ListDTO;
import com.hyz.dto.ListResult;
import com.hyz.service.CommentsService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author HGD
 * @date 2023/2/12 0:37
 */
@RestController
@RequestMapping("/douyin/comment")
public class CommentController {
    @Resource
    private CommentsService service;

    @GetMapping("/list")
    public ListResult getList(@RequestParam ListDTO listDTO) {
        return service.getList(listDTO);
    }

    @PostMapping("/action")
    public ActionResult actionComment(@RequestBody ActionDTO actionDTO) {
        return service.actionComment(actionDTO);
    }
}
